let arrNums=[0,1,2]
arrNums = new Proxy(arrNums,{
    get(target,prop){
        if(prop in target){
            return target[prop]
        }else{
            return -1
        }
    }
})
console.log(arrNums[3]);
let stu={
    name:"陶国荣",
    age:18
}
stu = new Proxy(stu,{
    get(target,prop){
        if(prop in target){
            return target[prop]
        }else{
            return prop
        }
    }
})
console.log(stu.name)
console.log(stu['code'])